home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
doom
/
axxwar_1.zip
/
SOURCES
/
TRACERAM.QC
< prev
next >
Wrap
Text File
|
1997-03-12
|
2KB
|
90 lines
// AxxWars Release v1.0
// TracerAmmo.qc
// One in five nails fired by the Perforator is a tracer.
/*
============
Tracer_Touch
============
*/
void() Tracer_Touch =
{
local vector org;
if (other.solid == SOLID_TRIGGER)
{
return;
}
if (pointcontents(self.origin) == CONTENT_SKY)
{
remove(self);
return;
}
if (other.takedamage)
{
spawn_touchblood (5);
T_Damage (other, self, self.owner, 5);
remove(self);
return;
}
else
{
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_SPIKE);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
self.velocity = '0 0 0';
remove(self);
};
/*
============
LaunchTracer
============
*/
void(vector org, vector vec) LaunchTracer =
{
local vector vec;
vec = normalize(vec);
newmis = spawn();
newmis.owner = self;
newmis.movetype = MOVETYPE_FLY;
newmis.solid = SOLID_BBOX;
newmis.effects = EF_DIMLIGHT;
setmodel (newmis, "progs/spike.mdl");
newmis.skin = 1;
setsize (newmis, '0 0 0', '0 0 0');
setorigin (newmis, org);
newmis.velocity = vec * 600;
newmis.angles = vectoangles(newmis.velocity);
newmis.nextthink = time + 5;
newmis.think = SUB_Remove;
newmis.touch = Tracer_Touch;
};
/*
===========
Tracer_Fire
===========
*/
void(vector org, vector vec) tracer_fire =
{
self.effects = self.effects | EF_MUZZLEFLASH;
makevectors (self.angles);
LaunchTracer(org, vec);
};